package com.yly;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by jizeUser on 2016-10-28.
 */
@Repository
public interface BetDao {

    @Insert("INSERT INTO betsix VALUES (#{id},#{date},#{te},#{m1},#{m2},#{m3},#{m4},#{m5},#{m6}," +
            "#{zf_daxiao},#{zf_danshuang},#{te_shengxiao},#{te_jiaye},#{te_danshuang},#{te_daxiao},#{te_color},#{tew_daxiao})")
    void addBetBean(BetBean bet);

    @Select("SELECT MAX(id) FROM betsix")
    int getMaxId();

    @Select("SELECT * FROM betsix")
    List<BetBean> getAllBetBeans();

    @Select("SELECT te_jiaye FROM betsix")
    List<String> getAllJiaye();

}
